package com.zzx.schoolfellow.controller;

import com.zzx.schoolfellow.model.entity.SensitiveWord;
import com.zzx.schoolfellow.service.impl.SensitiveWordServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/sensitiveords")
public class SensitiveWordController {
    @Resource
    private SensitiveWordServiceImpl sensitiveWordService;

    @GetMapping("/list")
    public List<SensitiveWord> getAllSensitiveWords() {
        return sensitiveWordService.getAllWords();
    }
}
